Skip to content

Stop tracking Gemfile.lock - #205

Merged
inukshuk merged 3 commits into
masterfrom
do-not-track-lockfile
Nov 15, 2026
Merged

inukshuk merged 3 commits into
masterfrom
do-not-track-lockfile

Conversation

@inukshuk

Copy link
Copy Markdown
Owner

@tmaier @mapreal19 I think this was suggested in the past already? I don't remember if there was a reason for keeping the lock file tracked, otherwise it should be much easier to work like this.

@mapreal19

Copy link
Copy Markdown
Collaborator

Right now I think it's best to keep it tracked so we don't install unwanted versions that might not be secure.

I'd add the cooldown option of 7 days at least if we remove Gemfile.lock from git. https://guides.rubygems.org/cooldown/

@tmaier

tmaier commented Nov 15, 2026

Copy link
Copy Markdown
Collaborator

I once investigated this topic. I think the current best practice is to indeed commit/teach the lock file

@inukshuk

Copy link
Copy Markdown
Owner Author

The guideline for Gems says not to commit the lockfile. Even to add lockfile false to the Gemfile. I'd follow the best practice here, plus the 7 days cooldown @mapreal19 suggests

@inukshuk

Copy link
Copy Markdown
Owner Author

OK so in an ideal world I'd set lockfile false in the Gemfile but the bundler cache used by CI depends on the lockfile. So I think git-ignoring it is fine for now. I'm also adding the cooldown 7 (you can override it from the command line).

@inukshuk
inukshuk merged commit 964d5cb into master Nov 15, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants